- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Make -Ztrack-diagnostics emit like a note #143286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| rustbot has assigned @WaffleLapkin. Use  | 
| It's now emitted as a note into the json output as well, right? Could you then migrate tests using  
 | 
b528aba    to
    dc4877b      
    Compare
  
    | 
 No, I only made it so that it gets rendered like a  
 Since this isn't changing the json, would you still like me to do this? | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
| 
 Compiletest is working on the json output, so  | 
dc4877b    to
    e47cd86      
    Compare
  
    | Some changes occurred in src/tools/clippy cc @rust-lang/clippy | 
e47cd86    to
    6d3ffe1      
    Compare
  
    | 
 I don't know how I would add it to the JSON output, but if I need to, I'll see what I can figure out. | 
64745dc    to
    3a82c35      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
3a82c35    to
    f361b92      
    Compare
  
    f361b92    to
    6bef238      
    Compare
  
    | @rustbot label -S-waiting-on-author +S-waiting-on-review | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| @bors r+ rollup | 
Rollup of 7 pull requests Successful merges: - #140643 (Refactor StableMIR) - #143286 (Make -Ztrack-diagnostics emit like a note) - #143308 (Remove `PointerLike` trait) - #143387 (Make __rust_alloc_error_handler_should_panic a function) - #143400 (Port `#[rustc_pass_by_value]` to the new attribute system) - #143417 (bump termize dep) - #143420 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143286 - Muscraft:track-diagnostics-note, r=WaffleLapkin Make -Ztrack-diagnostics emit like a note [#t-compiler/diagnostics > Rendering -Ztrack-diagnostics like a note](https://rust-lang.zulipchat.com/#narrow/channel/147480-t-compiler.2Fdiagnostics/topic/Rendering.20-Ztrack-diagnostics.20like.20a.20note/with/526608647) As discussed on the Zulip thread above, I want to make `-Ztrack-diagnostics` emit like a `note`. This is because I find its current output jarring, and the fact that it gets rendered completely left-aligned, [even in the middle of a snippet](https://github.com/rust-lang/rust/blob/86e05cd300fac9e83e812c4d46582b48db780d8f/tests/ui/track-diagnostics/track6.stderr), seems like something that should be changed. Turning it into a `note` seems like the best choice, as it would align it with the rest of the output, and `note` is already used for somewhat similar things, like seeing why a lint was fired. --- Note: turning `-Ztrack-diagnostics` into a `note` will also make `annotate-snippets` API a bit cleaner
Rollup of 7 pull requests Successful merges: - rust-lang/rust#140643 (Refactor StableMIR) - rust-lang/rust#143286 (Make -Ztrack-diagnostics emit like a note) - rust-lang/rust#143308 (Remove `PointerLike` trait) - rust-lang/rust#143387 (Make __rust_alloc_error_handler_should_panic a function) - rust-lang/rust#143400 (Port `#[rustc_pass_by_value]` to the new attribute system) - rust-lang/rust#143417 (bump termize dep) - rust-lang/rust#143420 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…=WaffleLapkin Make -Ztrack-diagnostics emit like a note [#t-compiler/diagnostics > Rendering -Ztrack-diagnostics like a note](https://rust-lang.zulipchat.com/#narrow/channel/147480-t-compiler.2Fdiagnostics/topic/Rendering.20-Ztrack-diagnostics.20like.20a.20note/with/526608647) As discussed on the Zulip thread above, I want to make `-Ztrack-diagnostics` emit like a `note`. This is because I find its current output jarring, and the fact that it gets rendered completely left-aligned, [even in the middle of a snippet](https://github.com/rust-lang/rust/blob/86e05cd300fac9e83e812c4d46582b48db780d8f/tests/ui/track-diagnostics/track6.stderr), seems like something that should be changed. Turning it into a `note` seems like the best choice, as it would align it with the rest of the output, and `note` is already used for somewhat similar things, like seeing why a lint was fired. --- Note: turning `-Ztrack-diagnostics` into a `note` will also make `annotate-snippets` API a bit cleaner
…=WaffleLapkin Make -Ztrack-diagnostics emit like a note [#t-compiler/diagnostics > Rendering -Ztrack-diagnostics like a note](https://rust-lang.zulipchat.com/#narrow/channel/147480-t-compiler.2Fdiagnostics/topic/Rendering.20-Ztrack-diagnostics.20like.20a.20note/with/526608647) As discussed on the Zulip thread above, I want to make `-Ztrack-diagnostics` emit like a `note`. This is because I find its current output jarring, and the fact that it gets rendered completely left-aligned, [even in the middle of a snippet](https://github.com/rust-lang/rust/blob/86e05cd300fac9e83e812c4d46582b48db780d8f/tests/ui/track-diagnostics/track6.stderr), seems like something that should be changed. Turning it into a `note` seems like the best choice, as it would align it with the rest of the output, and `note` is already used for somewhat similar things, like seeing why a lint was fired. --- Note: turning `-Ztrack-diagnostics` into a `note` will also make `annotate-snippets` API a bit cleaner
#t-compiler/diagnostics > Rendering -Ztrack-diagnostics like a note
As discussed on the Zulip thread above, I want to make
-Ztrack-diagnosticsemit like anote. This is because I find its current output jarring, and the fact that it gets rendered completely left-aligned, even in the middle of a snippet, seems like something that should be changed. Turning it into anoteseems like the best choice, as it would align it with the rest of the output, andnoteis already used for somewhat similar things, like seeing why a lint was fired.Note: turning
-Ztrack-diagnosticsinto anotewill also makeannotate-snippetsAPI a bit cleaner